class AssetAdapter implements eui.IAssetAdapter {
  /**
   * @language zh_CN
   * 解析素材
   * @param source 待解析的新素材标识符
   * @param compFunc 解析完成回调函数，示例：callBack(content:any,source:string):void;
   * @param thisObject callBack的 this 引用
   */
  public getAsset(source: string, compFunc: Function, thisObject: any): void {
    function onGetRes(data: any): void {
      compFunc.call(thisObject, data, source);
    }
    if (RES.hasRes(source)) {
      let data = RES.getRes(source);
      if (data) {
        onGetRes(data);
      } else {
        RES.getResAsync(source, onGetRes, this);
      }
    } else {
      RES.getResByUrl(source, onGetRes, this, RES.ResourceItem.TYPE_IMAGE);
    }
  }
}
